Skip to content

fix(worktree): scope catalog and simplify management - #1844

Merged
bobleer merged 3 commits into
GCWing:mainfrom
bobleer:bob/worktree-management-followup
Jul 29, 2026
Merged

fix(worktree): scope catalog and simplify management#1844
bobleer merged 3 commits into
GCWing:mainfrom
bobleer:bob/worktree-management-followup

Conversation

@bobleer

@bobleer bobleer commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #1841 based on post-merge review and hands-on validation:

  • Restrict the workspace catalog to worktrees beneath the configured BitFun worktree root, so Cursor, Codex, Claude, and unrelated Git worktrees are not shown.
  • Allow explicit manual deletion without requiring associated conversations to be deleted first.
  • Keep automatic cleanup conservative: it still skips every worktree with associated conversations.
  • Replace the nested, high-density cards with compact workspace headers and worktree rows.
  • Make each associated conversation directly openable from the worktree row.
  • Keep the current list mounted during refresh, preserve the settings scroll position across list mutations, and add lightweight loading and deletion transitions.
  • Prevent the transparent management wrapper from being rendered as a stale mouse-glow border after the list changes size.

Behavior

Manual deletion removes the checkout and its workspace registration while preserving associated conversation metadata and history. Dirty or unpublished work still requires the stronger destructive confirmation.

Clicking an active associated conversation opens it through the existing Agent companion session flow. If its workspace session metadata is not currently loaded, the settings page refreshes that workspace and retries. Clicking an archived conversation first offers to restore it, then opens it.

Initial loading uses a compact skeleton. Later refreshes retain the existing list with a small progress indicator instead of replacing the list and collapsing the scroll area. Successful deletion removes the row optimistically after a short exit transition, preserves the scroll anchor, and coalesces the backend change event with the explicit refresh.

The catalog resolves app.worktrees.rootPath and includes only descendant worktrees. The per-project worktree API used by session flows remains unchanged, so this does not alter Agent worktree creation or binding behavior added in #1841.

Verification

  • cargo check --workspace
  • cargo test -p bitfun-core service::worktree::tests:: (18 passed)
  • pnpm run type-check:web
  • pnpm run lint:web
  • pnpm --dir src/web-ui run test:run src/infrastructure/config/components/WorktreesConfig.test.tsx src/infrastructure/config/components/common/ConfigPageLayout.test.tsx (11 passed)
  • pnpm run i18n:audit (0 warnings)
  • node scripts/check-core-boundaries.mjs
  • pnpm run fmt:rs
  • Manual visual QA for loaded, refreshing, and initial-loading states in dark, light, and 480px-wide layouts.

Reviewer Notes

  • Only the settings catalog is scoped to the BitFun root. Repository-level worktree operations used by active session flows retain their existing behavior.
  • Automatic cleanup continues to protect associated conversations, including archived conversations.
  • Manual deletion intentionally leaves conversation history pointing at a checkout that no longer exists; it does not delete or silently rebind the conversation.
  • Motion uses only opacity and transform, and is disabled or reduced under prefers-reduced-motion.

@bobleer
bobleer merged commit 441044f into GCWing:main Jul 29, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant